import type { FC, PropsWithChildren } from "react";
import { context } from "../../../common/context";
import { ItemWraper } from "./style";

const Index: FC<PropsWithChildren & { style?: React.CSSProperties }> = ({
  children,
  ...props
}) => {
  const {
    resume: { customization },
  } = context;

  const { spacingFactor } = customization.spacing || {};
  return (
    <ItemWraper
      {...props}
      style={{
        ...props.style,
        paddingBottom: `${(spacingFactor || 0) * 2 + 10}px`,
      }}
    >
      {children}
    </ItemWraper>
  );
};
export default Index;
